package gjbsh.bangong.ds.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import gjbsh.bangong.ds.service.权限模块分配表Service;
import gjbsh.support.JsonResult;

/**
 * @author yaolongjun
 * @date   2020年5月25日 上午11:39:03
 */
@RestController
@RequestMapping("quanxian_moudle_fenpei")
public class 权限模块分配表Controller {
	
	private Logger logger = LoggerFactory.getLogger(getClass());
	
	@Autowired
	权限模块分配表Service ddService;
	
	/**
	 * @author yaolongjun
	 * @description	保存用户模块
	 */
	@RequestMapping("save_user_moudle")
	public JsonResult<?> save_user_moudle(@RequestParam("userid")String ppUserId,
			@RequestParam("moudleids")String ppMoudleids){
		try {
			return JsonResult.getSuccessResult(ddService.saveUserMoudle(ppUserId,ppMoudleids));
		} catch (Exception e) {
			logger.error("权限模块分配表Controller->save_user_moudle: "+e.getMessage());
			return JsonResult.getErrorResult("保存用户模块失败");
		}
	}

}
